//trademark接口的请求函数
import request from '@/utils/request'

export default {
    //删除
    delete(id) {
        return request.delete(`/admin/product/baseTrademark/remove/${id}`)
    },
    //新增 post /admin/product/baseTrademark/save

    //修改 put /admin/product/baseTrademark/update

    addOrUpdate(trademark) {
        if(trademark.id) {
            return request.put('/admin/product/baseTrademark/update',trademark) //代表修改
        }else {
            return request.post('/admin/product/baseTrademark/save',trademark) //代表添加
        }
    },
    //查看 get /admin/product/baseTrademark/{page}/{limit}
    getPageList(page,limit) {
        return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
    },
    //请求spuForm列表中的品牌列表
    getList(){
        return request.get(`/admin/product/baseTrademark/getTrademarkList`)
    }
}